package serverside;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 *
 * @author Sweelam
 */
public class BankDatabaseTest {
    
    public BankDatabaseTest() {
    }
    
    @BeforeClass
    public static void setUpClass() {
    }
    
    @AfterClass
    public static void tearDownClass() {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    /**
     * Test of select_particular_client_by_IdCard method, of class BankDatabase.
     */
    @Test
    public void testSelect_particular_client_by_IdCard() throws Exception
    {
        System.out.println("select_particular_client_by_IdCard");
        int id_card = 0;
        BankDatabase instance = new BankDatabase();
        ResultSet expResult = null;
        ResultSet result = instance.select_particular_client_by_IdCard(id_card);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
    }

    /**
     * Test of update_particular_info method, of class BankDatabase.
     */
    @Test
    public void testUpdate_particular_info() 
    {
        System.out.println("update_particular_info");
        int id_card = 0;
        int account_update = 0;
        BankDatabase instance = new BankDatabase();
        instance.update_particular_info(id_card, account_update);
        // TODO review the generated test code and remove the default call to fail.
    }

    /**
     * Test of update_Account_Money method, of class BankDatabase.
     */
    @Test
    public void testUpdate_Account_Money()throws Exception 
    {
        System.out.println("update_Account_Money");
        int id_card = 0;
        int money = 0;
        BankDatabase instance = new BankDatabase();
        boolean expResult = false;
        boolean result = instance.update_Account_Money(id_card, money);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
    }
    
    /**
     * Test of Check_IdCard method, of class BankDatabase.
     */
    @Test(expected = NullPointerException.class)
    public void testCheck_IdCard() 
    {
        System.out.println("Check_IdCard");
        int IDCard = 0;
        BankDatabase instance = new BankDatabase();
        boolean expResult = true;
        boolean result = instance.Check_IdCard(IDCard);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
    }

    /**
     * Test of SelectWithCondition method, of class BankDatabase.
     */
    @Test(expected = NullPointerException.class)
    public void testSelectWithCondition() throws SQLException
    {
        System.out.println("SelectWithCondition");
        String condition = "";
        int value = 0;
        BankDatabase instance = new BankDatabase();
        ResultSet expResult = null;
        ResultSet result = instance.SelectWithCondition(condition, value);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
    }
    
    /**
     * Test of login method, of class BankDatabase.
     */
    @Test
    public void testLogin() {
        System.out.println("login");
        int IDCard = 0;
        int password = 0;
        BankDatabase instance = new BankDatabase();
        boolean expResult = false;
        boolean result = instance.login(IDCard, password);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of Withdraw method, of class BankDatabase.
     */
    @Test
    public void testWithdraw() {
        System.out.println("Withdraw");
        int idCard = 0;
        int money = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.Withdraw(idCard, money);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of Deposit method, of class BankDatabase.
     */
    @Test
    public void testDeposit() {
        System.out.println("Deposit");
        int idCard = 0;
        int money = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.Deposit(idCard, money);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of transfer method, of class BankDatabase.
     */
    @Test
    public void testTransfer() {
        System.out.println("transfer");
        int account_nu = 0;
        int money = 0;
        int card_id = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.transfer(account_nu, money, card_id);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of bill_payment method, of class BankDatabase.
     */
    @Test
    public void testBill_payment() throws Exception {
        System.out.println("bill_payment");
        int card_id = 0;
        String company_name = "";
        int money = 0;
        int bill_nu = 0;
        int phone_nu = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.bill_payment(card_id, company_name, money, bill_nu, phone_nu);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of Balancing_query method, of class BankDatabase.
     */
    @Test
    public void testBalancing_query() throws Exception {
        System.out.println("Balancing_query");
        int card_id = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.Balancing_query(card_id);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of Change_PIN method, of class BankDatabase.
     */
    @Test
    public void testChange_PIN() {
        System.out.println("Change_PIN");
        int id_card = 0;
        int new_PIN = 0;
        BankDatabase instance = new BankDatabase();
        String expResult = "";
        String result = instance.Change_PIN(id_card, new_PIN);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

}
